﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MainGame : MonoBehaviour
{
    // Start is called before the first frame update
    void Awake() 
    {
#if APP_RELEASE
        Application.logMessageReceived += CaptureLog;
#else
        var reporterobj = UnityEngine.Object.Instantiate(Resources.Load<GameObject>("Reporter"));
#endif
    }
    void Start()
    {
        
    }
    // Update is called once per frame
    void Update()
    {
        
    }
    void CaptureLog(string condition, string stacktrace, LogType type)
    {
        if (type == LogType.Error || type == LogType.Exception)
        {
            Logcat.log("condition:" + condition + " \nstacktrace:" + stacktrace + " \nLogType:" + type);
        }
    }
}
